package com.xio.cloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author: xio
 * @Description: 订单控制层
 * @Date: 2020/9/24 16:11
 */
@RestController
@RequestMapping("/order")
@Slf4j
public class ZkOrderController {

    private static final String PAYMENT_URL = "http://cloud-payment-server";

    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/payment/zk")
    public String paymentInfo() {
        return restTemplate.getForObject(PAYMENT_URL + "/payment/zk", String.class);
    }

}
